home *** CD-ROM | disk | FTP | other *** search
- /*****
- * FILE: CAboutMacLock.c
- * Programmer: Mark Bykerk Kauffman
- * Date: 1/91
- * Purpose:
- * The AboutMacLock Class is used to create one object which acts
- * as an about box for MacLock. It displays some information in a
- * window and waits for the user to press a key or click the mouse.
- *
- * PARENTCLASS = CDirector
- *
- *****/
-
- #include <Global.h>
- #include <OSChecks.h>
- #include <CDesktop.h>
- #include <CDecorator.h>
- #include <CColorWindow.h>
- #include <CPicture.h>
- #include "CAboutMacLock.h"
-
- /* Global Variables for objects of this class. */
- extern CDesktop *gDesktop;
- extern CDecorator *gDecorator;
-
- /* Class Constants */
- #define WIND_ABOUT 2000
- #define Plain 0
-
- /* METHOD IMPLEMENTATIONS */
-
- /******
- * IAboutMacLock
- *
- * Initialize an AboutMacLock object.
- *
- ******/
-
- void CAboutMacLock::IAboutMacLock(
- CBureaucrat *itsSupervisor)
- {
- CDirector::IDirector(itsSupervisor);
-
- itsWindow = new(CWindow);
- itsWindow->IWindow(WIND_ABOUT, TRUE, gDesktop, this);
-
- gDecorator->CenterWindow(itsWindow);
-
- Display();
- }
-
-
- /*****
- * Dispose
- *
- * Release all of AboutMacLock's resourses. There's only one.
- *
- *****/
-
- void CAboutMacLock::Dispose()
- {
- ReleaseResource(aboutscreen);
- inherited::Dispose();
- }
-
-
- /*****
- * Display
- *
- * Display the AboutMacLock box.
- *
- *****/
-
- /*
- * Wait for a key press or mouse click.
- */
-
- static Boolean WaitForUserEvent()
- {
- EventRecord theEvent;
-
- while (TRUE) {
- GetNextEvent(everyEvent,&theEvent);
- switch (theEvent.what)
- {
- case keyDown:
- return(TRUE);
- break;
- case mouseDown:
- return(TRUE);
- break;
- }
- }
- }
-
- void CAboutMacLock::Display()
- {
-
- itsWindow->Select();
- itsWindow->Prepare();
- SetOrigin(-12, -12);
-
- TextSize(14);
- MoveTo(10,20);
- DrawString("\pI put many hours of work into this program, it is NOT");
- MoveTo(10,40);
- DrawString("\pFREE. This is a ONE DOLLAR SHAREWARE PROGRAM.");
- MoveTo(10,60);
- DrawString("\pIf you find this program useful, please take the time");
- MoveTo(10,80);
- DrawString("\pto put ONE DOLLAR in an envelope and send it to...");
- MoveTo(10,100);
- TextFace(bold);
- MoveTo(10,120);
- DrawString("\p Mark Kauffman");
- MoveTo(10,140);
- DrawString("\p 254 E. 7th Ave.");
- MoveTo(10,160);
- DrawString("\p Chico, CA 95926");
- TextSize(10);
- TextFace(Plain);
- MoveTo(10,190);
- DrawString("\pINSTRUCTIONS:");
- MoveTo(10,210);
- DrawString("\pUse command-p or the MacLock Menu to display the ");
- MoveTo(10,220);
- DrawString("\pChange Passowrd Dialog.");
- MoveTo(10,240);
- DrawString("\pPress the LOCK button to completly lock your system");
- MoveTo(10,250);
- DrawString("\puntil the password is typed in followed by the ");
- MoveTo(10,260);
- DrawString("\pReturn key.");
- WaitForUserEvent(); /* Wait for a key press or mouse click. */
- }
-